package my.jieh.tips.swing;

/**
 * <p>Title: Core Java Technologies Tech Tips</p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2002</p>
 * <p>Company: Blueimp</p>
 * @author jieh
 * @version 1.0
 */
import java.awt.*;
import javax.swing.*;

public class RedButton {
  public static void main(String args[]) {
    JFrame frame = new JFrame("Red");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container c = frame.getContentPane();
    JButton defaultColor = new JButton("Default Colors");
    c.add(defaultColor, BorderLayout.NORTH);
    UIManager.put("Button.background", Color.RED);
    JButton red1 = new JButton("Red1");
    JButton red2 = new JButton("Red2");
    JButton red3 = new JButton("Red3");
    JButton red4 = new JButton("Red4");
    c.add(red1, BorderLayout.SOUTH);
    c.add(red2, BorderLayout.WEST);
    c.add(red3, BorderLayout.EAST);
    c.add(red4, BorderLayout.CENTER);
    frame.setSize(300, 300);
    frame.show();
  }
}
